As a complete computer system that has complete hardware system functions and runs in a completely isolated environment may be simulated by means of software, virtual machines are widely used in the computer field because of the advantages such as less hardware resource occupation. When a virtual machine such as a QEMU-KVM (quick emulator-kernel-based virtual machine) is used, the device names of the disks are named in a hexavigesimal positional numeral system based on the 26 English letters (such as vda, vdb . . . vdz, vdaa, vdab . . . ), and the first unoccupied device name is generally allocated to each disk when the disk is created or inserted. If the virtual machine dynamically creates and deletes multiple disks, the drive letters may drift, that is, another device name is allocated to a disk to which a device name has been allocated when the disk is used again, where the creation and deletion order is not based on the same corresponding relationship (for example, the previously created disks have been subject to hot swap operation etc.).
The existing methods for solving the drive letter drift problem usually include: limiting the number of disks to less than or equal to 2, distinguishing the disk types, distinguishing the disk sizes, and creating and deleting disks in strict accordance with the disk usage order. Some of these methods limit the number of disks, some of them limit the size of disk, and some of them limit disk usage order, and lack convenience. The disadvantage of the prior art is that the effectiveness of solving the disk drift by limiting the use process is not high.